Drawing text in a user interface (UI) is currently a time-consuming and memory-intensive process. For each character in the text to be displayed in the UI, an outline description of the character must be rendered into pixels to create a glyph image, drawn into an off-screen buffer, and combined with any other UI elements that are being drawn. In order for the text to be drawn in the UI, the pixels of the glyph that have been rendered and drawn into the buffer are provided to a graphics processor as a texture. This may require several memory buffers, and copying of data between them. If a system has limited amounts of texture memory, repeated copying of texture data may be required in order to make the best use of the available memory.
A texture atlas improves the efficiency of drawing glyphs in a UI because the texture atlas can be loaded into a graphics memory buffer once and avoids repeated copying of small textures. However, if the texture atlas is created prior to use it must contain every glyph in every font that can possibly be drawn for display in the UI. This can be inefficient if only a subset of glyphs are commonly used. Furthermore, a given entry in a texture atlas is specific to the combination of parameters that apply to the glyph, for example the size of the font and the font face being used. Therefore each different combination of parameters for a given glyph require different entries in the texture atlas, which causes a strain on memory requirements.
Accordingly, additional, alternative, and/or improved methods and systems that provide glyph management using texture atlases remains highly desirable.
It will be noted that throughout the appended drawings, like features are identified by like reference numerals.